<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<style type="text/css">

.style2{
	border:1px solid red;
}

</style>
</head>
<body>

	1<input type="text" name="username" id="username" value="张三"><br>
	2<p id="address" style="color:black">合肥</p>
	
	<input type="button" value="改变" onclick="test()">	
	
	<script type="text/javascript">	
	function test(){
		var obj1=document.getElementById("username");
		obj1.value="李四";
		
		var obj2=document.getElementById("address");
		obj2.innerHTML="北京";		
		obj2.style.fontSize="30px";
		obj2.className="style2";		
	}
	
// 	var str="aa,bb,cc";
// 	var array=str.split(",");
// 	alert(array);
// 	var str2=array.join("-");
// 	alert(str2);
	
// 	var len=str.length;alert(len);
// 	alert(str.sub);
	

// 	var fruits = ["Banana", "Orange", "Apple", "Mango"];
// 	en=fruits.entries();
// 	alert(en.valueOf());
	

	
	</script>
</body>
</html>